
<html>
        <head>
            <meta charset="utf-8">
            <link href="./assets/bootstrap.min.css" rel="stylesheet">
            <link rel="stylesheet" href="./assets/font-awesome.min.css">
            <link href="./assets/webview.css" rel="stylesheet">
        
            <link rel="stylesheet" href="./assets/resources/jquery-ui/jquery-ui.complete.min.css"/>
            <link rel="stylesheet" href="./assets/resources/jspanel/jquery.jspanel.css"/>
            <title>Webview - DSP</title>
            <style type="text/css">
                input {
                    font-size: 11px;
                }
                select {
                    font-size: 11px;
                }
            </style>
        </head>
        
        <body>
            
            
                <nav class="navbar navbar-default" id="CFP2-DCO">
            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">CFP2-DCO-Chameleon</a>
                </div>
                
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li class="host"><a href="host.php">HOST</a></li>
                    <li class="gpio2"><a href="gpio2.php">GPIO</a></li>
        
                    
                    <!--<li class="package"><a href="package.php">Package</a></li>-->
                    <!--<li class="dlfiles"><a href="dlfiles.php">Download</a></li>-->	
                    <!--
                    
                    -->
                    <li class="ddm"><a href="ddm.php">DDM</a></li>
                    <!-- <li class="laser"><a href="laser.php">Laser</a></li> -->
                    <li class="mod_vr1"><a href="mod_vr1.php">Alarm Registers</a></li>						
                    <li class="prbs"><a href="prbs.php">PRBS</a></li>
                    <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">MDIO Registers <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li class="reg_map"><a href="reg_map.php">Register Map</a></li>
                            <li class="reg_rw"><a href="reg_rw.php">Register Read/Write</a></li>			
                        </ul>
                    </li>
                    <li class="upgrade"><a href="upgrade.php">FW Upgrade</a></li>
                    <li class="dropdown ">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">NEO Debug <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                        <li class="adc"><a href="adc.php">ADC</a></li>
                        <li class="dac"><a href="dac.php">DAC</a></li>
                        <li class="abc"><a href="abc.php">ABC</a></li>
                        <li class="cdm"><a href="cdm.php">CDM</a></li>
                        <li class="dsp"><a href="dsp.php">DSP</a></li>
                        <li class="gpio"><a href="gpio.php">GPIO - module</a></li>
                        <li class="itla"><a href="itla.php">ITLA</a></li>
                        <li class="trace"><a href="trace.php">Trace</a></li>
                        <li class="dlfiles"><a href="dlfiles.php">NEO Download</a></li>			
                        </ul>
                    </li>
                    
        
                    <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">System <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li class="settings"><a href="settings.php">Settings</a></li>
                        <li class="debug "><a href="debug.php">Debug</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#" data-toggle="modal" data-target="#myAbout">About...</a></li>
                    </ul>
                    </li>
                    <!--
                    <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Register <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li class="reg_map"><a href="reg_map.php">Register Map</a></li>
                        <li class="mod_vr"><a href="mod_vr.php">Module VR 1</a></li>
                        <li class="mod_vr1"><a href="mod_vr1.php">Module VR 1 new</a></li> 
                        <li class="reg_rw"><a href="reg_rw.php">Register Read/Write</a></li>
                        <li class="ddm"><a href="lane_vr.php">LANEs VR</a></li> 
                    </ul>
                    
                    </li>
                    
                    <li class="debug"><a href="debug.php">Debug</a></li>
                    <li id="settings"><a href="settings.php">Settings</a></li> 
        
                    <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">System <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li class="settings"><a href="settings.php">Settings</a></li>
                        <li class="debug"><a href="debug.php">Debug</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#" data-toggle="modal" data-target="#myAbout">About...</a></li>
                    </ul>
                    </li>
                    -->
                </ul>
                
                </div>
            </div>
            </nav>
            <div class="modal fade" id="myAbout" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
              <div class="modal-dialog modal-sm" role="document">
                <div class="modal-content">
                  <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">About</h4>
                  </div>
                  <div class="modal-body">
                      <center>
                        <img alt="Brand" src="./assets/imgs/logo.png"> 
                        <h3>Webview</h3>
                        <br>
                        <p>CFP2-DCO-Chameleon</p>
                        </center>
                  </div>
                </div>
              </div>
            </div>
                
            
        
        <script src="./assets/jquery.min.js"></script>
            <script type="text/javascript">
        
                $(document).ready(function(){
                    $("#CFP-DCO").hide();
                    $("#CFP2-DCO").hide();
        
                    var aid = (window.location.pathname.split("/")[1]).split(".")[0];
                    //console.log(aid);
                    $("."+aid).attr('class', 'active');
        
        
                    var prod_name = localStorage.getItem('prod_name');
                    //alert(prod_name);
        
                    if(prod_name)
                    {
                        $("#"+prod_name).show();
                    }
                    else
                    {
                        $("#CFP2-DCO").show();
                    }
        
                });
        
            </script>
            <!-- <div class="alert alert-info alert-dismissible" role="alert" id="info_bar">
              <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
              </button>
              <i class="fa fa-exclamation-triangle"></i>&nbsp;
              <span id="info_bar_text"> connect info </span>
            </div> -->
        
            <!-- 	<h1>DSP</h1> -->
            <div class="row">
              <div class="col-md-5">
                    <table class="table table-hover table-condensed">
                        <tr>
                            <td>
                                <button class="btn btn-success" id="btn_start_up">
                                <i class="fa fa-bolt"></i> DSP Startup
                                </button>
                                <div class="progress" style="margin-top:10px;margin-bottom: 0px">
                                    <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 100%" id="progress_val">
                                    </div>
                                </div>
                            </td>
        
                            <!-- 					
                            <td>
                        
                                <span id="status">
                                    <i id="btn_get_dsp_loading" class="fa fa-refresh fa-spin fa-fw fa-5x"></i>
                                </span>
                            </td> 
                            -->
                        </tr>
        
        
                    </table>
              </div>
              <div class="col-md-7">
        
                <!-- <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                  <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="headingOne">
                      <h4 class="panel-title">
                        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                          API Info Log &nbsp;&nbsp;<i class='fa fa-chevron-down'></i>
                        </a>
                          <span id="clean" class="pull-right"><a href="#">Clean</a></span>
                      </h4>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
            
                            <div class="panel-body">
                            <textarea  spellcheck="false" id="api_info" cols=100 rows=7 style="background-color:#FFFFCC"></textarea>
                      </div>
        
                    </div>
                  </div>
                </div> -->
        
              </div>
        
            </div>
        
            <div class="row">
            <!-- <iframe id="dsp_api" frameborder="no" border="0" src="dsp_api.php" width=100%></iframe>
         -->
        
         <div class="col-md-12">
                <table id="t_dac" class="table table-hover .table-responsive table-condensed">
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #1 Echo<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="Echo" cmdword="12,0,1,0,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="data0 | 0,255">
                                    data0		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Number" params_multiply_factor=1  params_type="Number" position="8,0,8"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="data1 | 0,255">
                                    data1		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Number" params_multiply_factor=1  params_type="Number" position="9,0,8"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #2 ReadRegister<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="ReadRegister" cmdword="12,0,228,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="Address | Hexadecimal value">
                                    Address		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Hexadecimal" params_multiply_factor=1  params_type="Hexadecimal" position="8,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #3 WriteRegister<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="WriteRegister" cmdword="16,0,227,1,8,0,0,0,0,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="Address | Hexadecimal value">
                                    Address		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Hexadecimal" params_multiply_factor=1  params_type="Hexadecimal" position="8,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="Value | Hexadecimal value">
                                    Value		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Hexadecimal" params_multiply_factor=1  params_type="Hexadecimal" position="12,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #4 SetHostBallMap<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetHostBallMap" cmdword="16,0,3,1,4,0,0,0,0,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="hrx_mapping | Hexadecimal value">
                                    hrx_mapping		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Hexadecimal" params_multiply_factor=1  params_type="Hexadecimal" position="8,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="htx_mapping | Hexadecimal value">
                                    htx_mapping		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Hexadecimal" params_multiply_factor=1  params_type="Hexadecimal" position="12,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #5 GetHostBallMap<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetHostBallMap" cmdword="8,0,4,1,12,0,0,0">
                                Send
                            </button>
                        </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #6 SetTransceiverMode<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetTransceiverMode" cmdword="32,0,0,1,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="path | ">
                                    path		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - EGRESS and INGRESS</option>
                                                                        <option value="1">1 - INGRESS only</option>
                                                                        <option value="2">2 - EGRESS only</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="line_fec | ">
                                    line_fec		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="0">0 - SDFEC-SC</option>
                                                                        <option value="1">1 - SDFEC-DC</option>
                                                                        <option value="2">2 - CFEC</option>
                                                                        <option value="3">3 - STAIRCASE</option>
                                                                        <option value="4">4 - ZR</option>
                                                                        <option value="5">5 - SDFEC-LP-SC</option>
                                                                        <option value="6">6 - SDFEC-LP-DC</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="pilot_symbol_separation | ">
                                    pilot_symbol_separ...		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Number" params_multiply_factor=1  params_type="Number" position="10,0,8"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="line_shaping | ">
                                    line_shaping		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Number" params_multiply_factor=1  params_type="Number" position="11,0,8"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="line_modulation | ">
                                    line_modulation		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="12,0,8">
                                                                        <option value="4">4 - QPSK</option>
                                                                        <option value="6">6 - 8QAM</option>
                                                                        <option value="8">8 - 16QAM</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="bcd_mode | ">
                                    bcd_mode		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Number" params_multiply_factor=1  params_type="Number" position="13,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="ltx_osr | ">
                                    ltx_osr		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="17,0,8">
                                                                        <option value="0">0 - 1</option>
                                                                        <option value="1">1 - 1.5</option>
                                                                        <option value="2">2 - 1.2</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lrx_osr | ">
                                    lrx_osr		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="18,0,8">
                                                                        <option value="0">0 - 1</option>
                                                                        <option value="1">1 - 1.5</option>
                                                                        <option value="2">2 - 1.2</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="Reference_clock | ">
                                    Reference_clock		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Number" params_multiply_factor=1  params_type="Number" position="19,0,32"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="signal_type | ">
                                    signal_type		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="23,0,32">
                                                                        <option value="0">0 - DISABLE</option>
                                                                        <option value="1">1 - OTL</option>
                                                                        <option value="2">2 - FLEXO</option>
                                                                        <option value="3">3 - 100GE-BA</option>
                                                                        <option value="4">4 - 100GE-BJ-SR</option>
                                                                        <option value="5">5 - 100GE-BJ-LR</option>
                                                                        <option value="6">6 - 400GE</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="line_mapping | ">
                                    line_mapping		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="27,0,32">
                                                                        <option value="0">0 - GMP-NONE</option>
                                                                        <option value="1">1 - GMP-4</option>
                                                                        <option value="2">2 - GMP-C</option>
                                                                        <option value="3">3 - GMP-4C</option>
                                                                        <option value="4">4 - GMP-P</option>
                                                                        <option value="5">5 - GMP-4P</option>
                                                                        <option value="6">6 - GMP-CP</option>
                                                                        <option value="7">7 - GMP-4CP</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="host_modulation | ">
                                    host_modulation		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="31,0,8">
                                                                        <option value="0">0 - PAM4</option>
                                                                        <option value="1">1 - NRZ</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #7 GetTransceiverMode<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetTransceiverMode" cmdword="8,0,1,1,24,0,0,0">
                                Send
                            </button>
                        </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #8 SetLineEgressHighSrPulseShaping<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetLineEgressHighSrPulseShaping" cmdword="12,0,34,1,4,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="3">3 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="roll_off_factor | ">
                                    roll_off_factor		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - PSF_ROF_0P1</option>
                                                                        <option value="2">2 - PSF_ROF_0P2</option>
                                                                        <option value="3">3 - PSF_ROF_0P3</option>
                                                                        <option value="4">4 - PSF_ROF_0P4</option>
                                                                        <option value="PSF_ROF_0P5">PSF_ROF_0P5 - PSF_ROF_0P5</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="pulse_shaping_filter | ">
                                    pulse_shaping_filt...		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="10,0,8">
                                                                        <option value="0">0 - RAISED_COSINE</option>
                                                                        <option value="1">1 - ROOT_RAISED_COSINE</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #9 GetLineEgressHighSrPulseShaping<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetLineEgressHighSrPulseShaping" cmdword="12,0,35,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="2">2 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #10 SetLineEgressHighSrLaneAmplitude<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetLineEgressHighSrLaneAmplitude" cmdword="12,0,38,1,4,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="3">3 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="amplitude | 0,0.5">
                                    amplitude		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Float" params_multiply_factor=131072  params_type="Float" position="9,0,16"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #11 GetLineEgressHighSrLaneAmplitude<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetLineEgressHighSrLaneAmplitude" cmdword="12,0,39,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="2">2 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #12 SetLineEgressHighSrLaneSkew<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetLineEgressHighSrLaneSkew" cmdword="12,0,30,1,4,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="3">3 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="skew | ">
                                    skew		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Float" params_multiply_factor=192  params_type="Float" position="9,0,16"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #13 GetLineEgressHighSrLaneSkew<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetLineEgressHighSrLaneSkew" cmdword="12,0,31,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="2">2 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #14 SetLineEgressHighSrPreEmphasis<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetLineEgressHighSrPreEmphasis" cmdword="72,0,36,1,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="3">3 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="coefficients | ">
                                    coefficients		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="signed byte" params_multiply_factor=1  params_type="signed byte" position="9,0,480"  style="width:110px; height:30px">
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="enable | ">
                                    enable		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="unsigned byte" params_multiply_factor=1  params_type="unsigned byte" position="69,0,8"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #15 GetLineEgressHighSrPreEmphasis<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetLineEgressHighSrPreEmphasis" cmdword="12,0,37,1,68,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="lane | ">
                                    lane		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - HI</option>
                                                                        <option value="1">1 - HQ</option>
                                                                        <option value="2">2 - VI</option>
                                                                        <option value="2">2 - VQ</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #16 SetLineIngressSkew<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetLineIngressSkew" cmdword="12,0,46,1,4,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="polarization | ">
                                    polarization		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - POLARIZATION_H</option>
                                                                        <option value="1">1 - POLARIZATION_V</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="skew_phase_i | ">
                                    skew_phase_i		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="signed integer" params_multiply_factor=1  params_type="signed integer" position="9,0,16"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #17 GetLineIngressSkew<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetLineIngressSkew" cmdword="12,0,47,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="polarization | ">
                                    polarization		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - POLARIZATION_H</option>
                                                                        <option value="1">1 - POLARIZATION_V</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #18 SetHostIngressLanePolarity<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetHostIngressLanePolarity" cmdword="12,0,16,1,4,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="polarity | Hexadecimal value">
                                    polarity		
                                </a>
                                <br>
                                                            <input type="text" name="text1" value=0 placeholder="Hexadecimal" params_multiply_factor=1  params_type="Hexadecimal" position="4,0,8"  style="width:110px; height:30px">
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #19 GetHostIngressLanePolarity<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetHostIngressLanePolarity" cmdword="8,0,17,1,8,0,0,0">
                                Send
                            </button>
                        </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #20 SetOtuClientTestPatternGeneratorConfig<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetOtuClientTestPatternGeneratorConfig" cmdword="16,0,118,1,4,0,0,0,0,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="channel | ">
                                    channel		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - CH_A</option>
                                                                        <option value="1">1 - CH_B</option>
                                                                        <option value="2">2 - CH_C</option>
                                                                        <option value="3">3 - CH_D</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="direction | ">
                                    direction		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - INGRESS</option>
                                                                        <option value="2">2 - EGRESS</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="signal_type | ">
                                    signal_type		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="10,0,8">
                                                                        <option value="0">0 - FRAMER_PRBS_7</option>
                                                                        <option value="1">1 - FRAMER_PRBS_9</option>
                                                                        <option value="2">2 - FRAMER_PRBS_11</option>
                                                                        <option value="3">3 - FRAMER_PRBS_15</option>
                                                                        <option value="4">4 - FRAMER_PRBS_20</option>
                                                                        <option value="5">5 - FRAMER_PRBS_23</option>
                                                                        <option value="6">6 - FRAMER_PRBS_29</option>
                                                                        <option value="7">7 - FRAMER_PRBS_31</option>
                                                                        <option value="8">8 - FRAMER_NULL</option>
                                                                        <option value="9">9 - FRAMER_AIS</option>
                                                                        <option value="10">10 - FRAMER_LCK</option>
                                                                        <option value="11">11 - FRAMER_OCI</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="keep_incoming_fs | ">
                                    keep_incoming_fs		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="11,0,8">
                                                                        <option value="0">0 - DISABLE</option>
                                                                        <option value="1">1 - ENABLE</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="enable | ">
                                    enable		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="12,0,8">
                                                                        <option value="0">0 - DISABLE</option>
                                                                        <option value="1">1 - ENABLE</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #21 GetOtuClientTestPatternGeneratorConfig<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetOtuClientTestPatternGeneratorConfig" cmdword="12,0,119,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="channel | ">
                                    channel		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - CH_A</option>
                                                                        <option value="1">1 - CH_B</option>
                                                                        <option value="2">2 - CH_C</option>
                                                                        <option value="3">3 - CH_D</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="direction | ">
                                    direction		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - INGRESS</option>
                                                                        <option value="2">2 - EGRESS</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #22 SetOtuClientTestPatternCheckerConfig<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="SetOtuClientTestPatternCheckerConfig" cmdword="18,0,120,1,4,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="channel | ">
                                    channel		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - CH_A</option>
                                                                        <option value="1">1 - CH_B</option>
                                                                        <option value="2">2 - CH_C</option>
                                                                        <option value="3">3 - CH_D</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="direction | ">
                                    direction		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - INGRESS</option>
                                                                        <option value="2">2 - EGRESS</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="signal_type | ">
                                    signal_type		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="10,0,8">
                                                                        <option value="0">0 - FRAMER_PRBS_7</option>
                                                                        <option value="1">1 - FRAMER_PRBS_9</option>
                                                                        <option value="2">2 - FRAMER_PRBS_11</option>
                                                                        <option value="3">3 - FRAMER_PRBS_15</option>
                                                                        <option value="4">4 - FRAMER_PRBS_20</option>
                                                                        <option value="5">5 - FRAMER_PRBS_23</option>
                                                                        <option value="6">6 - FRAMER_PRBS_29</option>
                                                                        <option value="7">7 - FRAMER_PRBS_31</option>
                                                                        <option value="8">8 - FRAMER_NULL</option>
                                                                        <option value="9">9 - FRAMER_AIS</option>
                                                                        <option value="10">10 - FRAMER_LCK</option>
                                                                        <option value="11">11 - FRAMER_OCI</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="enable | ">
                                    enable		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="11,0,8">
                                                                        <option value="0">0 - DISABLE</option>
                                                                        <option value="1">1 - ENABLE</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #23 GetOtuClientTestPatternCheckerConfig<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetOtuClientTestPatternCheckerConfig" cmdword="12,0,121,1,8,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="channel | ">
                                    channel		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - CH_A</option>
                                                                        <option value="1">1 - CH_B</option>
                                                                        <option value="2">2 - CH_C</option>
                                                                        <option value="3">3 - CH_D</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="direction | ">
                                    direction		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - INGRESS</option>
                                                                        <option value="2">2 - EGRESS</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #24 GetLineIngressDspStatus<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetLineIngressDspStatus" cmdword="8,0,63,1,28,0,0,0">
                                Send
                            </button>
                        </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #25 GetErrorCorrectionStatistics<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetErrorCorrectionStatistics" cmdword="12,0,103,1,132,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="channel | ">
                                    channel		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - CH_A</option>
                                                                        <option value="1">1 - CH_B</option>
                                                                        <option value="2">2 - CH_C</option>
                                                                        <option value="3">3 - CH_D</option>
                                                                        <option value="4">4 - FRAMER_X00GE</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="direction | ">
                                    direction		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - INGRESS</option>
                                                                        <option value="2">2 - EGRESS</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #26 GetOtuTestPatternCheckerStatistics<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="GetOtuTestPatternCheckerStatistics" cmdword="12,0,126,1,68,0,0,0,0,0,0,0">
                                Send
                            </button>
                        </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="channel | ">
                                    channel		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="8,0,8">
                                                                        <option value="0">0 - CH_A</option>
                                                                        <option value="1">1 - CH_B</option>
                                                                        <option value="2">2 - CH_C</option>
                                                                        <option value="3">3 - CH_D</option>
                                                                        <option value="4">4 - FRAMER_X00GE</option>
                                                                    </select>
                                
                            </td>
        
                                            <td> 
                                <a style="color:#666;font-size:11px" title="direction | ">
                                    direction		
                                </a>
                                <br>
                                                            <select style="width:110px; height:30px" params_multiply_factor=1 params_type="Choice" position="9,0,8">
                                                                        <option value="1">1 - INGRESS</option>
                                                                        <option value="2">2 - EGRESS</option>
                                                                    </select>
                                
                            </td>
        
                                    </tr>
        
                            <tr>
                        <td>
                            <span style="font-size: 13px"> 
                            #27 TriggerMonitors<br>
                            </span>
                                                <button class="btn btn-sm btn-success btn-apis" cmd="TriggerMonitors" cmdword="8,0,108,1,4,0,0,0">
                                Send
                            </button>
                        </td>
        
                                    </tr>
        
                        </table>
        
              </div>
        
        
            </div>
        
        
            <div class="modal fade" id="myModalxxx" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
              <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                  <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">DSP API Reslut</h4>
                  </div>
                  <div class="modal-body">
                    
                  </div>
        
                </div>
              </div>
            </div>
        
            <script src="./assets/jquery.min.js"></script>
            <script src="./assets/bootstrap.min.js"></script>	
        
        
            <script src="./assets/resources/jquery-ui/jquery-ui-complete.min.js"></script>
            <!-- <script src="./assets/resources/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js"></script> -->
            <script src="./assets/resources/jspanel/jquery.jspanel.min.js"></script>
              
            <script type="text/javascript">
                var dsp_pop_win = localStorage.getItem('dsp_pop_win');
        
                // function check_connect_status()
                // {
                // 	$("#info_bar").hide();
                // 	url = "cgi/cgi_host.php?opt=check_connect_status";
                // 	$.get(url, function(data, status){
                // 		if(data == 'connect_error')
                // 		{
                // 			$("#info_bar_text").html("Please check COM port connectivity ...");
                // 			$("#info_bar").show();
                // 		}
        
                // 	});
                // }
        
                //$("#btn_get_dsp_loading").hide();
        
                var i = 0;
                function get_status(data)
                {
                    // console.log("get_status...");
                    // url = "cgi/cgi_dsp.php?opt=state";
                    // $.get(url, function(data, status){
                    // 	console.log(data)
                    // 	i = i + 1
                    // 	if(data == 9){
                    // 		$("#status").html("OK");
                    // 		//$("#btn_get_dsp_loading").hide();
                    // 		var curr_prog = 100
                    // 		$("#progress_val").html(curr_prog + "% OK !" + " retcode: " + data)
                    // 		$("#progress_val").attr("aria-valuenow", curr_prog) 
                    // 		$("#progress_val").attr("style", "width: "+ curr_prog + "%") 
                    // 		clearTimeout(t);
                    // 	}
                    // 	else
                    // 	{
                    // 		var curr_prog = data*10 + i
                    // 		$("#progress_val").html(curr_prog + "%" + " retcode: " + data)
                    // 		$("#progress_val").attr("aria-valuenow", curr_prog)  
                    // 		$("#progress_val").attr("style", "width: "+ curr_prog + "%")
                    // 	}
        
                    // });
                    // t=setTimeout("get_status()", 10000);
                    if(data == "OK")
                    {
                        $("#status").html(data);
                        var curr_prog = 100;
                        $("#progress_val").html(curr_prog + "% " + data +" !" );
                        $("#progress_val").attr("aria-valuenow", curr_prog) ;
                        $("#progress_val").attr("style", "width: "+ curr_prog + "%") ;
                        $("#progress_val").attr("class", "progress-bar progress-bar-success") ;
                    }
                    else
                    {
                        $("#status").html(data);
                        var curr_prog = 50;
                        $("#progress_val").html(curr_prog + "% " + data +" !" );
                        $("#progress_val").attr("aria-valuenow", curr_prog) ;
                        $("#progress_val").attr("style", "width: "+ curr_prog + "%") ;
                        $("#progress_val").attr("class", "progress-bar progress-bar-danger progress-bar-striped") ;
                    }
                }
        
            
                $(document).ready(function(){
                    $.jsPanel({
                        position: {left: 620, top: 80},
                        title: 'DSP API Info',
                        size:  {width: 700, height: 350},
                        content: '<textarea  spellcheck="false" id="api_info" cols=120 rows=20 style="background-color:#FFFFCC"></textarea>',
                        theme: 'light'
                    });
                    // check_connect_status();
        
                    // parent.document.all("dsp_api").style.height=document.body.scrollHeight-200; 
        
                    $("#btn_start_up").click(function(){
                        //$("#btn_get_dsp_loading").show();
                        $("#progress_val").attr("class", "progress-bar progress-bar-success progress-bar-striped active") ;
                        $("#progress_val").html("Starting ...");
        
                        url = "cgi/cgi_dsp.php?opt=startup";
                        $.get(url, function(data, status){
                            console.log(data);
                            get_status(data);
                            //$("#status").html(data);
                        });
                    });
        
                    $("#clean").click(function(){
                        $("#api_info").html('');
                    });
        
        
                    $(".btn-apis").click(function(){
                        var cmd = $(this).attr('cmd');
                        var cmdword = $(this).attr('cmdword');
                        var params_str = ''
                        var position_str = ''
                        var params_type_str = ''
                        var params_multiply_factor_str = ''
        
                        //var api_info = window.top.document.getElementById("api_info");
        
                        
                        $("#api_info", window.top.document).append("send: " + cmd +" : " + cmdword + "\r\n");
        
                        var parent = $(this).parent().nextAll('td');
                        parent.each(function(i){
                            //alert($(this).find(':input').val());
                            params = $(this).find(':input').val();
                            params_str = params_str + params + ',';
        
                            position =  $(this).find(':input').attr('position');
                            position_str = position_str + position + '|';
        
                            params_type = $(this).find(':input').attr('params_type');
                            params_type_str = params_type_str + params_type + '|';
        
                            params_multiply_factor = $(this).find(':input').attr('params_multiply_factor');
                            params_multiply_factor_str = params_multiply_factor_str + params_multiply_factor + '|';
        
        
                            $("#api_info", window.top.document).append("params#" + i + ": "  + params + ">>>params_type: " + params_type + ">>>position: " + position + "\r\n");
                        });
        
                        $("#api_info", window.top.document).append("--------------------------------------------------------------------------------\r\n");
                        //alert(params_str);
        
                        url = "cgi/cgi_dsp.php?opt=set_api" + "&cmdword=" + cmdword + "&params_str=" + params_str + "&position_str=" + position_str + "&params_type_str=" + params_type_str + "&cmd=" + cmd + "&params_multiply_factor_str=" + params_multiply_factor_str ;
                        $.get(url, function(data, status){
                            console.log("resp...");
                            console.log(data);
        
                            $("#api_info", window.top.document).append("resp:" + data.replace(/\r\n/g, "\r\n")  + "\r\n");
        
                            //Jump to the last line
                            var d = window.top.document.getElementById("api_info").scrollHeight;
                            window.top.document.getElementById("api_info").scrollTop = d;
        
                            $(".modal-body").html("resp:" + data.replace(/\r\n/g, "<br>")  + "<br>");
                
                            // $(".jsPanel-content", window.top.document).append("resp:" + data.replace(/\r\n/g, "\r\n")  + "\r\n");
        
        
                            // if(dsp_pop_win)
                            // {
                            // 	if(dsp_pop_win == 'enable')
                            // 	{
                            // 		$('#myModal').modal('show');
                            // 	}
                            // }
                            // else
                            // {
                            // 	$('#myModal').modal('show');
                            // }
        
                        });
        
                        
                    });
        
        
                });
        
        
        
            </script>
        
        </body>
        </html>